<template>
  <input-config v-if="data.name === 'Input'" :data="data"></input-config>
  <textarea-config
    v-else-if="data.name === 'Textarea'"
    :data="data"
  ></textarea-config>
  <phone-config v-else-if="data.name === 'Phone'" :data="data"></phone-config>
  <password-config
    v-else-if="data.name === 'Password'"
    :data="data"
  ></password-config>
</template>

<script>
import AllComponents from './components'
export default {
  name: 'WhichComponents',
  components: { ...AllComponents },
  props: {
    data: {
      type: Object,
      required: true,
    },
  },
}
</script>
